package com.ruoyi.qualityManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qualityManagement.mapper.OutboundInspectionMapper;
import com.ruoyi.qualityManagement.domain.OutboundInspection;
import com.ruoyi.qualityManagement.service.IOutboundInspectionService;

/**
 * 出货检管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-05
 */
@Service
public class OutboundInspectionServiceImpl implements IOutboundInspectionService 
{
    @Autowired
    private OutboundInspectionMapper outboundInspectionMapper;

    /**
     * 查询出货检管理
     * 
     * @param inspectionId 出货检管理主键
     * @return 出货检管理
     */
    @Override
    public OutboundInspection selectOutboundInspectionByInspectionId(Long inspectionId)
    {
        return outboundInspectionMapper.selectOutboundInspectionByInspectionId(inspectionId);
    }

    /**
     * 查询出货检管理列表
     * 
     * @param outboundInspection 出货检管理
     * @return 出货检管理
     */
    @Override
    public List<OutboundInspection> selectOutboundInspectionList(OutboundInspection outboundInspection)
    {
        return outboundInspectionMapper.selectOutboundInspectionList(outboundInspection);
    }

    /**
     * 新增出货检管理
     * 
     * @param outboundInspection 出货检管理
     * @return 结果
     */
    @Override
    public int insertOutboundInspection(OutboundInspection outboundInspection)
    {
        outboundInspection.setCreateTime(DateUtils.getNowDate());
        return outboundInspectionMapper.insertOutboundInspection(outboundInspection);
    }

    /**
     * 修改出货检管理
     * 
     * @param outboundInspection 出货检管理
     * @return 结果
     */
    @Override
    public int updateOutboundInspection(OutboundInspection outboundInspection)
    {
        outboundInspection.setUpdateTime(DateUtils.getNowDate());
        return outboundInspectionMapper.updateOutboundInspection(outboundInspection);
    }

    /**
     * 批量删除出货检管理
     * 
     * @param inspectionIds 需要删除的出货检管理主键
     * @return 结果
     */
    @Override
    public int deleteOutboundInspectionByInspectionIds(Long[] inspectionIds)
    {
        return outboundInspectionMapper.deleteOutboundInspectionByInspectionIds(inspectionIds);
    }

    /**
     * 删除出货检管理信息
     * 
     * @param inspectionId 出货检管理主键
     * @return 结果
     */
    @Override
    public int deleteOutboundInspectionByInspectionId(Long inspectionId)
    {
        return outboundInspectionMapper.deleteOutboundInspectionByInspectionId(inspectionId);
    }
}
